<?php
namespace app\index\controller;

use app\common\model\Chat;
use app\common\model\Info;
use app\common\model\Qqjob;
use app\common\model\Qqs;
use app\common\model\Gg;
use app\common\model\Users;
use app\common\model\Weblist;
use app\common\model\Prizes;
use app\common\model\Prizelog;
use app\common\model\Qds;
use app\common\model\Jfdh;

class MobileHtml extends Common
{
    public function _empty()
    {
        exit($this->fetch('mobile/common/empty'));
    }

    function __construct()
    {
        parent:: __construct();
        if (!request()->isAjax()) {
            $this->assign('alert', '你想做什么?');
            $this->assign('url', '/');
            exit($this->fetch('pc/common/msg'));
        }
    }
	
	public function other($act)
    {
        switch ($act) {
			case 'cjlist':
					$select = Prizelog::search();
						if (false === $select) {
							$list = '获取列表失败，请稍后再试';
						} elseif (is_string($select)) {
							$list = $select;
						} else {
							$list = '';
							foreach ($select['list'] as $row) {
								$list .= '<dl>
									<dt><img class="w7 h7 b r5 mr2" src="'.$row['photo'].'"></dt>
									<dd><p class="f3 hong"><i class="icon icon-my"></i> '.$row['name'].'</p>
										<p class="f3 hui">花费 '.config('sys_cj_need_jf').' 积分抽中了 <font class="lv">'.$row['data'].'</font></p></dd>
									<dt class="t-r f2 hui">'.time_tran($row['cjtime']).'</dt></dl>';
							}
						}
						echo $list;
				break;
			case 'dhlist':
					$select = Jfdh::search(WEB_ID);
						if (false === $select) {
							$list = '获取列表失败，请稍后再试';
						} elseif (is_string($select)) {
							$list = $select;
						} else {
							$list = '';
							foreach ($select['list'] as $row) {
								$list .= '<dl>
									<dt><img class="w7 h7 b r5 mr2" src="'.$row['photo'].'"></dt>
									<dd><p class="f3 hong"><i class="icon icon-my"></i> '.$row['nickname'].'</p>
										<p class="f3 hui">花费 '.$row['jf'].' 积分兑换了 <font class="lv">'.$row['value'].'</font></p></dd>
									<dt class="t-r f2 hui">'.time_tran($row['time']).'</dt></dl>';
							}
						}
						echo $list;
				break;
			case 'qdlist':
				$select = Qds::search();
				if (false === $select) {
					$list = '获取列表失败，请稍后再试';
				} elseif (is_string($select)) {
					$list = $select;
				} else {
					$list = '';
					foreach ($select['list'] as $row) {
						$list .= '
						<dl> <dt><img class="w7 h7 b r5 mr2" src="'.$row['photo'].'"></dt> <dd> <p class="f3 hong"><i class="icon icon-my"></i> '.$row['nickname'].'</p> <p class="f3 hui">'.$row['data'].'</p> </dd> <dt class="t-r"> <p class="lv bold">签到'.$row['day'].'天</p> <p class="f3 hui">'.time_tran($row['qdtime']).'</p> </dt> </dl>';
					}
				}
				echo $list;
				break;
			case 'qd':
				$qqlist=Qqs::getMyQqList($this->userInfo['uid'],1,100);
				$list='';
				foreach ($qqlist['list'] as $row) {
					if(Qqs::isQqZt($row['qid'])) {
						$zt = '<font class="lv">正常</font>';
					} else {
						$zt = '<font class="cheng">失效</font>';
					}	
					$list .= '
					<dl class="in p3" onclick="x.ajax(\''.url('user_ajax/other',['act'=>'qds']).'\',\'qid=' . $row['qid'] . '\');"> <dt><img class="w7 h7 b r5 mr2" src="https://q4.qlogo.cn/headimg_dl?dst_uin=' . $row['qq'] . '&spec=100"></dt> <dd> <p class="hui f3"><i class="icon icon-my mr1"></i> '.get_qqnick($row['qq']).'</p> <p class="dzi bold"><i class="icon icon-qq"></i> <font class="">' . $row['qq'] . '</font></p> </dd> <dt class="pl3 pr3 f4">'.$zt.'</dt> <dt><i class="icon icon-pright hui dl"></i></dt> </dl>';
				}
				echo '<div class="app-header t-v bg-bai dl2 bb b-hui"> <span class="header-l t-v nowrap" onclick="x.mclose();"><i class="icon icon-pleft f9"></i>返回</span> <span class="header-c t-v t-c nowrap">秒赞QQ列表</span> <span class="header-r t-v t-r nowrap" onclick=""><i class="icon  f10"></i></span> </div> <div class="app-content bg-bai f5"> <div class="w h10 t-v t-c bb f6 hong bold">请选择一个QQ用于签到</div> <div class="w h12 p2 t-v bb cheng f3">注意：签到会在你所选择的QQ空间内发布一条本平台的推广广告说说，如不能接受，请勿签到</div> <div class="in-list in-b in-bb"> '.$list.'</div> </div>';
				break;
		}
	}
	
	public function gnset($act)
    {
        switch ($act) {
			case 'zan':
                $qid = input('get.qid');
                $job = Qqjob::where('qid', '=', $qid)->where('type', '=', 'zan')->find();
                $this->assign('job', $job);
                echo $this->fetch('/mobile/html/gnset/zan');
                break;
            case 'reply':
                $qid = input('get.qid');
                $job = Qqjob::where('qid', '=', $qid)->where('type', '=', 'reply')->find();
                $this->assign('job', $job);
                echo $this->fetch('/mobile/html/gnset/reply');
                break;
            case 'qunqd':
                $qid = input('get.qid');
                $job = Qqjob::where('qid', '=', $qid)->where('type', '=', 'qunqd')->find();
                $this->assign('job', $job);
                echo $this->fetch('/mobile/html/gnset/qunqd');
                break;
			case 'shuo':
                $qid = input('get.qid');
                $job = Qqjob::where('qid', '=', $qid)->where('type', '=', 'shuo')->find();
                $this->assign('job', $job);
                echo $this->fetch('/mobile/html/gnset/shuo');
                break;
            case 'zf':
                $qid = input('get.qid');
                $job = Qqjob::where('qid', '=', $qid)->where('type', '=', 'zf')->find();
                $this->assign('job', $job);
                echo $this->fetch('/mobile/html/gnset/zf');
                break;
            case 'ql':
                $qid = input('get.qid');
                $job = Qqjob::where('qid', '=', $qid)->where('type', '=', 'ql')->find();
                $this->assign('job', $job);
                echo $this->fetch('/mobile/html/gnset/ql');
                break;
            case 'qunqd':
                $qid = input('get.qid');
                $job = Qqjob::where('qid', '=', $qid)->where('type', '=', 'qunqd')->find();
                $this->assign('job', $job);
                echo $this->fetch('/mobile/html/gnset/qunqd');
                break;
            case 'qd':
                $qid = input('get.qid');
                $job = Qqjob::where('qid', '=', $qid)->where('type', '=', 'qd')->find();
                $this->assign('job', $job);
                echo $this->fetch('/mobile/html/gnset/qd');
                break;
			case 'wyqd':
                $qid = input('get.qid');
                $job = Qqjob::where('qid', '=', $qid)->where('type', '=', 'wyqd')->find();
                $this->assign('job', $job);
                echo $this->fetch('/mobile/html/gnset/wyqd');
                break;
		}
	}
	
	public function debug()
    {
        $data = input('');
		$is = [
				[
					'name' => '说说秒赞',
					'id' => 'zan'
				],[
					'name' => '说说秒评',
					'id' => 'reply'
				],[
					'name' => '自动说说',
					'id' => 'shuo'
				],[
					'name' => '转发说说',
					'id' => 'zf'
				],[
					'name' => '情侣空间',
					'id' => 'ql'
				],
				[
					'name' => '删除说说',
					'id' => 'del'
				],[
					'name' => '删除留言',
					'id' => 'delly'
				],[
					'name' => '花藤代养',
					'id' => 'ht'
				],[
					'name' => '手Q加速',
					'id' => 'mqq'
				],[
					'name' => '手游加速',
					'id' => 'sy'
				],[
					'name' => 'Q群签到',
					'id' => 'qunqd'
				],[
					'name' => '空间签到',
					'id' => 'qd'
				],[
					'name' => '会员签到',
					'id' => 'hyqd'
				],
				[
					'name' => '黄钻签到',
					'id' => 'hzqd'
				],[
					'name' => '好莱坞签到',
					'id' => 'hlwqd'
				],[
					'name' => '大会员签到',
					'id' => 'dhyqd'
				],[
					'name' => '微视签到',
					'id' => 'wsqd'
				],[
					'name' => 'QQ运动',
					'id' => 'yundong'
				],[
					'name' => '空间人气',
					'id' => 'renqi'
				],[
					'name' => '网易云签到',
					'id' => 'wyqd'
				],[
					'name' => '互赞名片赞',
					'id' => 'hzmp'
				]
				];
        $job = Qqjob::where(
            [
                'qid' => $data['qid'],
                'type' => $data['type']
            ]
        )->find();
		foreach($is as $v){
			if($v['id']===$data['type']){
				if ($job['start'] == 0) {
					$result = '
					<div class="app-header t-v bg-bai dl2 bb b-hui"><span class="header-l t-v nowrap" onclick="x.mclose();"><i
							class="icon icon-pleft f9"></i>返回</span> <span class="header-c t-v t-c nowrap">'.$v['name'].' [手动执行]</span> <span
							class="header-r t-v t-r nowrap" onclick=""><i class="icon  f10"></i></span></div>
					<div class="app-content bg-bai">
						<div class="p5 f5" id="debugbody"><div class="w t-v t-c"><span class="pt6 pb10 mb10"><i class="icon icon-info f17 hui dl"></i><p class="f6 t-c mt4 hui">功能尚未开启，请开启后再执行</p></span></div></div>
					</div>';
				} else {
					$url = $this->qqtaskApi($data['type'], $data['qid']);
					dump($url);
					$debug = file_get_contents($url);
					$result = '<title>'.$v['name'].' [手动执行]</title>
					<div class="app-header t-v bg-bai dl2 bb b-hui"><span class="header-l t-v nowrap" onclick="x.mclose();"><i
							class="icon icon-pleft f9"></i>返回</span> <span class="header-c t-v t-c nowrap">'.$v['name'].' [手动执行]</span> <span
							class="header-r t-v t-r nowrap" onclick=""><i class="icon  f10"></i></span></div>
					<div class="app-content bg-bai">
						<div class="p5 f5" id="debugbody">
							'.$debug .'
						</div>
					</div>';
				}
			}
		}
        echo $result;
    }
	
	public function qqtaskApi($type, $qid)
    {
        $row = Qqs::findByqid($qid);
        $job = Qqjob::where('qid', '=', $qid)
            ->where('type', '=', $type)
            ->find();
        $skey = $row['skey'];
        $pskey = $row['pskey'];
        $qq = $row['qq'];
        switch ($type) {
            case 'zan':
                $run_url = Weblist::gjApiUrl() . 'Other/taskrun/app.php?act=' . $type . '&qq=' . $qq . '&skey=' . $skey . '&pskey=' . $pskey . '&method=' . $job['xy'] . '&forbid=' . $job['list'] . '&runkey=' . md5(RUN_KEY) . '';
                break;
            case'reply':
                $run_url = Weblist::gjApiUrl() . 'Other/taskrun/app.php?act=' . $type . '&qq=' . $qq . '&skey=' . $skey . '&pskey=' . $pskey . '&method=' . $job['xy'] . '&content=' . $job['data'] . '&runkey=' . md5(RUN_KEY) . '';
                break;
            case 'shuo':
                $run_url = Weblist::gjApiUrl() . 'Other/taskrun/app.php?act=' . $type . '&qq=' . $qq . '&skey=' . $skey . '&pskey=' . $pskey . '&method=' . $job['xy'] . '&content=' . $job['data'] . '&tuid=' . $job['tuid'] . '&delete=' . $job['del'] . '&mode=' . $job['mode'] . '&img=' . $job['url'] . '&runkey=' . md5(RUN_KEY) . '';
                break;
            case 'zf':
                $run_url = Weblist::gjApiUrl() . 'Other/taskrun/app.php?act=' . $type . '&qq=' . $qq . '&skey=' . $skey . '&pskey=' . $pskey . '&method=' . $job['xy'] . '&nr=' . $job['data'] . '&uin=' . $job['list'] . '&runkey=' . md5(RUN_KEY) . '';
                break;
            case 'qipao':
                $run_url = Weblist::gjApiUrl() . 'Other/taskrun/app.php?act=' . $type . '&qq=' . $qq . '&skey=' . $skey . '&mode=' . $job['mode'] . '&runkey=' . md5(RUN_KEY) . '';
                break;
            case 'ql':
                $run_url = Weblist::gjApiUrl() . 'Other/taskrun/app.php?act=' . $type . '&qq=' . $qq . '&skey=' . $skey . '&mode=' . $job['mode'] . '&runkey=' . md5(RUN_KEY) . '';
                break;
            case 'del':
                $run_url = Weblist::gjApiUrl() . 'Other/taskrun/app.php?act=' . $type . '&qq=' . $qq . '&skey=' . $skey . '&pskey=' . $pskey . '&method=' . $job['mode'] . '&runkey=' . md5(RUN_KEY) . '';
                break;
            case 'delly':
                $run_url = Weblist::gjApiUrl() . 'Other/taskrun/app.php?act=' . $type . '&qq=' . $qq . '&skey=' . $skey . '&pskey=' . $pskey . '&method=' . $job['mode'] . '&runkey=' . md5(RUN_KEY) . '';
                break;
            case 'renqi':
                $run_url = get_Domain() . 'Other/taskrun/app.php?act=' . $type . '&qq=' . $qq . '&runkey=' . md5(RUN_KEY) . '';
                break;
            case 'ly':
                $run_url = get_Domain() . 'Other/taskrun/app.php?act=' . $type . '&qq=' . $qq . '&runkey=' . md5(RUN_KEY) . '';
                break;
            case 'ht':
                $run_url = Weblist::gjApiUrl() . 'Other/taskrun/app.php?act=' . $type . '&qq=' . $qq . '&skey=' . $row['skey'] . '&pskey=' . $row['pskey'] . '&runkey=' . md5(RUN_KEY) . '';
                break;
            case 'mqq':
                $run_url = Weblist::gjApiUrl() . 'Other/taskrun/app.php?act=' . $type . '&qq=' . $qq . '&skey=' . $row['skey'] . '&runkey=' . md5(RUN_KEY) . '';
                break;
            case 'sy':
                $run_url = Weblist::gjApiUrl() . 'Other/taskrun/app.php?act=' . $type . '&qq=' . $qq . '&skey=' . $row['skey'] . '&runkey=' . md5(RUN_KEY) . '';
                break;
            case 'qunqd':
                $run_url = Weblist::gjApiUrl() . 'Other/taskrun/app.php?act=' . $type . '&qq=' . $qq . '&skey=' . $row['skey'] . '&pskey=' . $row['pskey'] . '&tuid=' . $job['tuid'] . '&con=' . $job['data'] . '&forbid=' . $job['list'] . '&poi=' . $job['url'] . '&runkey=' . md5(RUN_KEY) . '';
                break;
            case 'qd':
                $run_url = Weblist::gjApiUrl() . 'Other/taskrun/app.php?act=' . $type . '&qq=' . $qq . '&skey=' . $row['skey'] . '&pskey=' . $row['pskey'] . '&content=' . $job['data'] . '&runkey=' . md5(RUN_KEY) . '';
                break;
            case 'blqd':
                $run_url = Weblist::gjApiUrl() . 'Other/taskrun/app.php?act=' . $type . '&qq=' . $qq . '&superkey=' . $row['superkey'] . '&runkey=' . md5(RUN_KEY) . '';
                break;
            case 'qbqd':
                $run_url = Weblist::gjApiUrl() . 'Other/taskrun/app.php?act=' . $type . '&qq=' . $qq . '&skey=' . $row['skey'] . '&runkey=' . md5(RUN_KEY) . '';
                break;
            case 'hyqd':
                $run_url = Weblist::gjApiUrl() . 'Other/taskrun/app.php?act=' . $type . '&qq=' . $qq . '&skey=' . $row['skey'] . '&runkey=' . md5(RUN_KEY) . '';
                break;
            case 'lzqd':
                $run_url = Weblist::gjApiUrl() . 'Other/taskrun/app.php?act=' . $type . '&qq=' . $qq . '&skey=' . $row['skey'] . '&superkey=' . $row['superkey'] . '&runkey=' . md5(RUN_KEY) . '';
                break;
            case 'hzqd':
                $run_url = Weblist::gjApiUrl() . 'Other/taskrun/app.php?act=' . $type . '&qq=' . $qq . '&skey=' . $row['skey'] . '&pskey=' . $row['pskey'] . '&runkey=' . md5(RUN_KEY) . '';
                break;
            case 'fzqd':
                $run_url = Weblist::gjApiUrl() . 'Other/taskrun/app.php?act=' . $type . '&qq=' . $qq . '&skey=' . $row['skey'] . '&runkey=' . md5(RUN_KEY) . '';
                break;
            case 'hlwqd':
                $run_url = Weblist::gjApiUrl() . 'Other/taskrun/app.php?act=' . $type . '&qq=' . $qq . '&skey=' . $row['skey'] . '&runkey=' . md5(RUN_KEY) . '';
                break;
			case 'wsqd':
                $run_url = Weblist::gjApiUrl() . 'Other/taskrun/app.php?act=' . $type . '&qq=' . $qq . '&skey=' . $row['skey'] . '&pskey=' . $row['pskey'] . '&runkey=' . md5(RUN_KEY) . '';
                break;
			case 'dhyqd':
                $run_url = Weblist::gjApiUrl() . 'Other/taskrun/app.php?act=' . $type . '&qq=' . $qq . '&skey=' . $row['skey'] . '&pskey=' . $row['pskey'] . '&runkey=' . md5(RUN_KEY) . '';
                break;
			case 'renqi':
                $run_url = Weblist::gjApiUrl() . 'Other/taskrun/app.php?act=' . $type . '&qq=' . $qq . '&runkey=' . md5(RUN_KEY) . '';
                break;
			case 'wyqd':
                $run_url = Weblist::gjApiUrl() . 'Other/taskrun/app.php?act=' . $type . '&username=' . $job['list'] . '&password=' . $job['data'] . '&runkey=' . md5(RUN_KEY) . '';
                break;
			case 'yundong':
                $run_url = Weblist::gjApiUrl() . 'Other/taskrun/app.php?act=' . $type . '&qq=' . $qq . '&skey=' . $row['skey'] . '&runkey=' . md5(RUN_KEY) . '';
                break;
			case 'hzmp':
                $run_url = Weblist::gjApiUrl() . 'Other/taskrun/app.php?act=' . $type . '&qq=' . $qq . '&skey=' . $row['skey'] . '&pskey=' . $row['pskey'] . '&runkey=' . md5(RUN_KEY) . '';
                break;
        }
        return $run_url;
    }

    public function qqlist($act)
    {
        switch ($act) {
            case 'list':
                $select = Qqs::listhtml($this->userInfo['uid']);
                    if (false === $select) {
                        $result['message'] = '获取列表失败，请稍后再试';
                    } elseif (is_string($select)) {
                        $result['message'] = $select;
                    } else {
                        $result = $select['list'];
                    }	
					echo $result.' <script> reBox.endUpLoading(false);
	 </script> <script>setTimeout(function(){x.swiperlistleft();},50)</script>';
                break;
		    case 'load_qqzt':
				$qid = input('get.qid');
				$qq = input('get.qq');
				$name =  get_qqnick($qq);
                if(Qqs::isQqZt($qid)) {
                        $result = '<dt class="pl3 pr3"><img src="//q4.qlogo.cn/headimg_dl?dst_uin='.$qq.'&spec=100" class="b b-hui r5 w12 h12"
                                 style="border-width:0.04rem !important;"/></dt>
        <dd class="pr3"><p class="f3 hui">'.$name.'</p> <h4 class="t-v">'.$qq.'<font class="lv ml2 f5"><i
                class="icon icon-squarecheck mr1"></i>正常</font></h4>
            <p class="f2 hui mt1">状态若显示失效请及时更新防止功能不运行</p></dd>';
                    } else {
                        $result = '<dt class="pl3 pr3"><img src="//q4.qlogo.cn/headimg_dl?dst_uin='.$qq.'&spec=100" class="b b-hui r5 w12 h12"
                                 style="border-width:0.04rem !important;"/></dt>
        <dd class="pr3"><p class="f3 hui">'.$name.'</p> <h4 class="t-v">'.$qq.' <font class="hong ml2 f5"><i
                class="icon icon-squarecheck mr1"></i>失效</font><button class="btn btn-xs btn-hei btn-1 rx2 ml2" onclick="mode_qq_add(\'qqset\',\''.$qid.'\');">点此更新</button></h4>
            <p class="f2 hui mt1">状态若显示失效请及时更新防止功能不运行</p></dd>';
                    }	
					echo $result;
                break;
			case 'myAddGnList':
				$uin = input('qq');
                $list = Qqjob::myAddGnList($uin);
                foreach ($list as $row) {
                    if ($row['start'] == 1 && $row['cookiezt'] == 0) {
                        $is_ = 'checked="checked"';
                        $is_color = 'lv';
                    } else {
                        $is_ = '';
                        $is_color = 'hong';
                    }
                    if ($row['type'] == 'auto') {
                        $login_type = Qqs::findByqid($row['qid']);
                        if ($login_type['type'] == 0) {
                            $istype = '扫码登录';
                        } else {
                            $istype = '密码登录';
                        }
                        echo '<dl class="h12" id="isauto"><a class="in" href="javascript:void(0);" onclick="qqset_mode_footer(\'auto\',\''. $row['qid'] .'\',\'[24H自动] 当QQ状态失效时，自动更新QQ在线状态\');"><dt><img class="w7 h7 ml2 mr2" src="/Static/img/isauto.png"></dt><dt><p class="dzi bold"><i class="icon icon-dian lv"></i> 状态更新</p><p class="f2 hui" style="padding-left:0.02rem;"><i class="icon icon-time nobold" style="margin-right:0.03rem;"></i> ' . $row['lasttime'] . '</p></dt><dd class="pl2 pr2 f1 hui dl t-r">[' . $istype . ']</dd></a><dt class="pl3 pr3"><label class="i-switch i-switch-lg bg-lan" onclick="x.btn(\'状态更新无法关闭','本站已为所有用户开启了打码更新功能<br>保障您的QQ在线状态一直处于正常在线\');"> <input type="checkbox" checked="checked" disabled=""> <i></i> </label></dt></dl>';
                    }
                    if ($row['type'] == 'zan') {
						$is_type_name = '说说秒赞';
						$is_type_title = '[24H自动] 为QQ空间好友发表的动态进行点赞';
						$mzcount= Qqjob::QqMzNum($row['qq']);
					}
					if ($row['type'] == 'hzmp') {
						$is_type_name = '互赞名片赞';
						$is_type_title = '[24H自动] 每天自动与网站用户QQ互赞名片赞1000次';
					}
					if ($row['type'] == 'reply') {
						$is_type_name = '说说秒评';
						$is_type_title = '[24H自动] 评论QQ空间好友发表的动态';
					}
					if ($row['type'] == 'qunqd') {
						$is_type_name = 'Q群签到';
						$is_type_title = '每天进行QQ群签到';
					}
					if ($row['type'] == 'mqq') {
						$is_type_name = '手机加速';
						$is_type_title = '加速QQ升级,需要是QQ会员且QQ绑定了手机';
					}
					if ($row['type'] == 'sy') {
						$is_type_name = '手游加速';
						$is_type_title = '玩10分钟手游加0.2天QQ活跃天加速QQ升级';
					}
					//New
					if ($row['type'] == 'shuo') {
						$is_type_name = '自动说说';
						$is_type_title = '离线自动发布说说';
                    }
                    if ($row['type'] == 'zf') {
						$is_type_name = '转发说说';
						$is_type_title = '离线自动转发好友说说';
                    }
                    if ($row['type'] == 'ql') {
						$is_type_name = '情侣积分';
						$is_type_title = '每天刷满情侣空间积分';
                    }
					if ($row['type'] == 'del') {
						$is_type_name = '删除说说';
						$is_type_title = '自动删除说说,仅保留最新10条';
                    }
                    if ($row['type'] == 'delly') {
						$is_type_name = '删除留言';
						$is_type_title = '开启任务会逐渐清空留言板';
                    }
					if ($row['type'] == 'ht') {
						$is_type_name = '花藤代养';
						$is_type_title = '每日花藤各项进行浇灌';
                    }
					if ($row['type'] == 'qd') {
                        $is_type_name = '空间签到';
						$is_type_title = '每天进行QQ空间签到';
                    }
					if ($row['type'] == 'hyqd') {
                        $is_type_name = '会员签到';
						$is_type_title = '每天进行QQ会员签到';
                    }
					if ($row['type'] == 'hzqd') {
                        $is_type_name = '黄钻签到';
						$is_type_title = '每天进行黄钻签到';
                    }
					if ($row['type'] == 'hlwqd') {
                        $is_type_name = '好莱坞签到';
						$is_type_title = '每天进行好莱坞会员签到';
                    }
					if ($row['type'] == 'dhyqd') {
                        $is_type_name = '大会员签到';
						$is_type_title = '每天进行QQ大会员签到';
                    }
					if ($row['type'] == 'wsqd') {
                        $is_type_name = '微视签到';
						$is_type_title = '每天进行微视签到';
                    }
					if ($row['type'] == 'yundong') {
                        $is_type_name = 'QQ运动';
						$is_type_title = '每天QQ运动打卡';
                    }
					if ($row['type'] == 'renqi') {
                        $is_type_name = '空间人气';
						$is_type_title = '每天互刷10个空间访客';
                    }
					if ($row['type'] == 'wyqd') {
                        $is_type_name = '网易云签到';
						$is_type_title = '每天进行网易云音乐打卡签到';
                    }
					if ($row['type'] !== 'auto') {
						if($row['type']=='zan'){
							echo '<dl class="h12" id="is'.$row['type'].'"> <a class="in" href="javascript:void(0);" onclick="qqset_mode_footer(\''.$row['type'].'\',\''. $row['qid'] .'\',\''.$is_type_title.'\');"> <dt><img class="w7 h7 ml2 mr2" src="/Static/img/is'.$row['type'].'.png"></dt> <dt> <p class="dzi bold"><i class="icon icon-dian ' . $is_color . '"></i> '.$is_type_name.'</p> <p class="f2 hui" style="padding-left:0.02rem;"><i class="icon icon-time nobold" style="margin-right:0.03rem;"></i> ' . $row['lasttime'] . '</p> </dt> <dd class="pl2 pr2 f1 hui dl t-r">已积累秒赞:'.$mzcount.'次</dd> </a> <dt class="pl3 pr3"><label class="i-switch i-switch-lg bg-lan" onclick="x.mode(\''.url('mobile_html/gnset',['act'=>$row['type']]).'?qid='. $row['qid'] .'\',\'gnset'.$row['type'].'\');"> <input type="checkbox" ' . $is_ . ' disabled=""> <i></i> </label></dt> </dl>';
						}elseif($row['type']=='reply' || $row['type']=='shuo' || $row['type']=='zf' || $row['type']=='ql' || $row['type']=='qunqd' || $row['type']=='qd' || $row['type']=='wyqd'){
							echo '<dl class="h12" id="is'.$row['type'].'"> <a class="in" href="javascript:void(0);" onclick="qqset_mode_footer(\''.$row['type'].'\',\''. $row['qid'] .'\',\''.$is_type_title.'\');"> <dt><img class="w7 h7 ml2 mr2" src="/Static/img/is'.$row['type'].'.png"></dt> <dt> <p class="dzi bold"><i class="icon icon-dian ' . $is_color . '"></i> '.$is_type_name.'</p> <p class="f2 hui" style="padding-left:0.02rem;"><i class="icon icon-time nobold" style="margin-right:0.03rem;"></i> ' . $row['lasttime'] . '</p> </dt> <dd class="pl2 pr2 f1 hui dl t-r"></dd> </a> <dt class="pl3 pr3"><label class="i-switch i-switch-lg bg-lan" onclick="x.mode(\''.url('mobile_html/gnset',['act'=>$row['type']]).'?qid='. $row['qid'] .'\',\'gnset'.$row['type'].'\');"> <input type="checkbox" ' . $is_ . ' disabled=""> <i></i> </label></dt> </dl>';
						}else{
							echo '<dl class="h12" id="is'.$row['type'].'"><a class="in" href="javascript:void(0);" onclick="qqset_mode_footer(\''.$row['type'].'\',\''. $row['qid'] .'\',\''.$is_type_title.'\');">
							<dt><img class="w7 h7 ml2 mr2" src="/Static/img/is'.$row['type'].'.png"></dt>
							<dt><p class="dzi bold"><i class="icon icon-dian ' . $is_color . '"></i> '.$is_type_name.'</p>
								<p class="f2 hui" style="padding-left:0.02rem;"><i class="icon icon-time nobold" style="margin-right:0.03rem;"></i> ' . $row['lasttime'] . '</p></dt>
							<dd class="pl2 pr2 f1 hui dl t-r"></dd>
						</a>
							<dt class="pl3 pr3"><label class="i-switch i-switch-lg bg-lan"> <input type="checkbox"  ' . $is_ . ' onclick="x.ajax(\''.url('mobile_ajax/gnset',['act'=>$row['type']]).'\',\'qid='. $row['qid'] .'&amp;type='.$row['type'].'\',1);"> <i></i> </label></dt>
						</dl>';
						}
					}

                }
                break;
       }
		
    }
	
    protected
    function _initialize()
    {
        parent::_initialize();
        $this->checkLogin();
		if(!check_mobile()){
			header('Location: '.url('pc/index').'');
			exit;
		}
		
    }
	
	private
    function checkLogin()
    {
        $check_Login = Users::checkLogin();
        if ($check_Login != null) {
            $this->assign('alert', $check_Login['msg']);
            $this->assign('url', $check_Login['url']);
            exit($this->fetch('pc/common/msg'));
        } else {
            $this->userInfo = Users::getLoginUser();
            $this->assign('userInfo', $this->userInfo);

        }
    }
}